home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-stream.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  59 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                          A D A . S T R E A M S                           --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.7 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  22. --                                                                          --
  23. ------------------------------------------------------------------------------
  24.  
  25.  
  26. package Ada.Streams is
  27. pragma Pure (Streams);
  28.  
  29.    type Root_Stream_Type is abstract tagged limited private;
  30.  
  31.    type Stream_Element is mod 2 ** Standard'Storage_Unit;
  32.  
  33.    type Stream_Element_Offset is range
  34.      -(2 ** (Standard'Address_Size - 1)) ..
  35.      +(2 ** (Standard'Address_Size - 1)) - 1;
  36.  
  37.    subtype Stream_Element_Count is
  38.       Stream_Element_Offset range 0 .. Stream_Element_Offset'Last;
  39.  
  40.    type Stream_Element_Array is
  41.       array (Stream_Element_Offset range <>) of Stream_Element;
  42.  
  43.    procedure Read
  44.      (Stream : in out Root_Stream_Type;
  45.       Item   : out Stream_Element_Array;
  46.       Last   : out Stream_Element_Offset)
  47.    is abstract;
  48.  
  49.    procedure Write
  50.      (Stream : in out Root_Stream_Type;
  51.       Item   : in Stream_Element_Array)
  52.    is abstract;
  53.  
  54. private
  55.  
  56.    type Root_Stream_Type is abstract tagged limited null record;
  57.  
  58. end Ada.Streams;
  59.